<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Auth_OpenID_Server</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class Auth_OpenID_Server</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">I handle requests for an OpenID server.</p>
<p class="description"><p>Some types of requests (those which are not checkid requests) may  be handed to my <a href="../OpenID/Auth_OpenID_Server.html#methodhandleRequest">handleRequest</a> method, and I will take care  of it and return a response.</p><p>For your convenience, I also provide an interface to <a href="../OpenID/Auth_OpenID_Decoder.html#methoddecode">Auth_OpenID_Decoder::decode()</a> and <a href="../OpenID/Auth_OpenID_SigningEncoder.html#methodencode">Auth_OpenID_SigningEncoder::encode()</a> through my methods <a href="../OpenID/Auth_OpenID_Server.html#methoddecodeRequest">decodeRequest</a> and <a href="../OpenID/Auth_OpenID_Server.html#methodencodeResponse">encodeResponse</a>.</p><p>All my state is encapsulated in an <a href="../OpenID/Auth_OpenID_OpenIDStore.html">Auth_OpenID_OpenIDStore</a>.</p><p>Example:</p><p><pre> $oserver = new Auth_OpenID_Server(Auth_OpenID_FileStore($data_path),
                                   "http://example.com/op");
 $request = $oserver->decodeRequest();
 if (in_array($request->mode, array('checkid_immediate',
                                    'checkid_setup'))) {
     if ($app->isAuthorized($request->identity, $request->trust_root)) {
         $response = $request->answer(true);
     } else if ($request->immediate) {
         $response = $request->answer(false);
     } else {
         $app->showDecidePage($request);
         return;
     }
 } else {
     $response = $oserver->handleRequest($request);
 }

 $webresponse = $oserver->encode($response);</pre></p></p>
		<p class="notes">
			Located in <a class="field" href="_Auth---OpenID---Server.php.html">/Auth/OpenID/Server.php</a> (line <span class="field">1611</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																														
				<div class="method-definition">
											<span class="method-result">Auth_OpenID_Server</span>
										<a href="#Auth_OpenID_Server" title="details" class="method-name">Auth_OpenID_Server</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">&$store</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$op_endpoint</span> = <span class="var-default">null</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#decodeRequest" title="details" class="method-name">decodeRequest</a>
											([<span class="var-type"></span>&nbsp;<span class="var-name">$query</span> = <span class="var-default">null</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#encodeResponse" title="details" class="method-name">encodeResponse</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">&$response</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result"><a href="../OpenID/Auth_OpenID_ServerResponse.html">Auth_OpenID_ServerResponse</a></span>
										<a href="#handleRequest" title="details" class="method-name">handleRequest</a>
											(<span class="var-type"><a href="../OpenID/Auth_OpenID_Request.html">Auth_OpenID_Request</a></span>&nbsp;<span class="var-name">$request</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#openid_associate" title="details" class="method-name">openid_associate</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">&$request</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#openid_check_authentication" title="details" class="method-name">openid_check_authentication</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">&$request</span>)
									</div>
											</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodAuth_OpenID_Server" id="Auth_OpenID_Server"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">Constructor Auth_OpenID_Server</span> (line <span class="line-number">1612</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	
	<div class="method-signature">
		<span class="method-result">Auth_OpenID_Server</span>
		<span class="method-name">
			Auth_OpenID_Server
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">&$store</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$op_endpoint</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$store</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$op_endpoint</span>			</li>
				</ul>
		
			
	</div>
<a name="methoddecodeRequest" id="decodeRequest"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">decodeRequest</span> (line <span class="line-number">1685</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Decodes a query args array into the appropriate  <a href="../OpenID/Auth_OpenID_Request.html">Auth_OpenID_Request</a> object.</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			decodeRequest
		</span>
					([<span class="var-type"></span>&nbsp;<span class="var-name">$query</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$query</span>			</li>
				</ul>
		
			
	</div>
<a name="methodencodeResponse" id="encodeResponse"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">encodeResponse</span> (line <span class="line-number">1676</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Encodes as response in the appropriate format suitable for  sending to the user agent.</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			encodeResponse
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">&$response</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$response</span>			</li>
				</ul>
		
			
	</div>
<a name="methodhandleRequest" id="handleRequest"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">handleRequest</span> (line <span class="line-number">1633</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Handle a request.  Given an <a href="../OpenID/Auth_OpenID_Request.html">Auth_OpenID_Request</a> object,  call the appropriate <a href="../OpenID/Auth_OpenID_Server.html">Auth_OpenID_Server</a> method to  process the request and generate a response.</p>
	<ul class="tags">
				<li><span class="field">return:</span> A response object  capable of generating a user-agent reply.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../OpenID/Auth_OpenID_ServerResponse.html">Auth_OpenID_ServerResponse</a></span>
		<span class="method-name">
			handleRequest
		</span>
					(<span class="var-type"><a href="../OpenID/Auth_OpenID_Request.html">Auth_OpenID_Request</a></span>&nbsp;<span class="var-name">$request</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"><a href="../OpenID/Auth_OpenID_Request.html">Auth_OpenID_Request</a></span>
				<span class="var-name">$request</span><span class="var-description">: An <a href="../OpenID/Auth_OpenID_Request.html">Auth_OpenID_Request</a>  returned by <a href="../OpenID/Auth_OpenID_Server.html#methoddecodeRequest">Auth_OpenID_Server::decodeRequest()</a>.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodopenid_associate" id="openid_associate"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">openid_associate</span> (line <span class="line-number">1653</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The callback for 'associate' messages.</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			openid_associate
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">&$request</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$request</span>			</li>
				</ul>
		
			
	</div>
<a name="methodopenid_check_authentication" id="openid_check_authentication"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">openid_check_authentication</span> (line <span class="line-number">1645</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The callback for 'check_authentication' messages.</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			openid_check_authentication
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">&$request</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$request</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Wed, 05 Dec 2007 14:02:13 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
	</p>
	</div></body>
</html>